+function(){
	// 获取用户名，绑定事件
	
	var uname = document.getElementById("input_account");
	uname.onblur = function(){
		// 1、创建xhr对象
		var xhr = new XMLHttpRequest();
		var tip = document.getElementsByClassName("popb")[0];
		// 2、监听xhr的状态改变
		xhr.onreadystatechange = function(){
			if(xhr.status == 200 && xhr.readyState == 4){
				tip.innerHTML = xhr.responseText;
			}
		}
		// 3、连接web服务器
		xhr.open('GET','check_uname.php?uname='+this.value,true);
		// xhr.open('POST','check_uname.php',true);
		// xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		// xhr.send('uname=+this.value');
		// 4、发送请求服务器
		xhr.send(null);
	}
}();
+function(){
	var word = document.getElementById('word');
	var colors = ['red', 'yellow'];
	var letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '@', '%', '&', '!', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
	var skip = 4;
	var counter = 0;
	var swap = function() {

	  if (counter++ == skip) {
	    randWord =
	      letters[Math.floor(Math.random() * 30)] +
	      letters[Math.floor(Math.random() * 39)] +
	      letters[Math.floor(Math.random() * 39)] +
	      letters[Math.floor(Math.random() * 39)]; +
	    letters[Math.floor(Math.random() * 39)]; +
	    letters[Math.floor(Math.random() * 39)];
	    word.innerHTML = randWord;
	    word.dataset.text = randWord;

	    counter = 0;
	  }
	  window.requestAnimationFrame(swap);
	}
}();